<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="${pageContext.request.contextPath}/util/jquery-3.2.1.min.js"></script>
</head>
<body>
<input type="date" value="2012-12-12 12:12:12" id="dateTest">
<script>

    "use strict";

    $(function () {

        let str = $("#dateTest").attr("value")

        str = str.substr(0, 10)

        alert($("#dateTest").attr("value"))

        $("#dateTest").val(str)
    })

</script>
</body>
</html>
